package com.mysoft.gfyx.marketdevelop.controller;

import com.mysoft.framework.rpc.annotation.PubAction;
import com.mysoft.framework.rpc.annotation.PubService;
import com.mysoft.framework.rpc.contants.RequestPrefix;
import com.mysoft.gfyx.marketdevelop.controller.dto.GetDataByCreditCodeDto;
import com.mysoft.gfyx.marketdevelop.controller.dto.GetPurchaseGraphRequestDto;
import com.mysoft.gfyx.marketdevelop.controller.dto.GetWinBidGraphRequestDto;
import com.mysoft.gfyx.marketdevelop.mip.dto.SearchDeveloperRequestDto;
import com.mysoft.gfyx.marketdevelop.service.DeveloperGraphService;
import com.mysoft.gfyx.marketdevelop.service.DeveloperService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMethod;

@PubService(value = "/developerGraphDataApi", prefix = RequestPrefix.API)
@Tag(name = "开发商与项目图谱-API")
public class DeveloperGraphDataApiController {

    @Autowired
    private DeveloperGraphService developerGraphService;

    @PubAction(value = "/getPurchaseGraph", method = RequestMethod.POST)
    public Object getPurchaseGraph(@RequestBody GetPurchaseGraphRequestDto dto) {
        return developerGraphService.getPurchaseGraph(dto.getPurchaseId());
    }

    @PubAction(value = "/getWinBidGraph", method = RequestMethod.POST)
    public Object getWinBidGraph(@RequestBody GetWinBidGraphRequestDto dto) {
        return developerGraphService.getWinningBidGraph(dto.getId());
    }

    @PubAction(value = "/getTakenLandGraph", method = RequestMethod.POST)
    public Object getTakenLandGraph(@RequestBody GetWinBidGraphRequestDto dto) {
        return developerGraphService.getTakenLandGraph(dto.getId());
    }

    @PubAction(value = "/getCommencePermitGraph", method = RequestMethod.POST)
    public Object getCommencePermitGraph(@RequestBody GetWinBidGraphRequestDto dto) {
        return developerGraphService.getCommencePermitGraph(dto.getId());
    }

    @PubAction(value = "/getMohurdProjectGraph", method = RequestMethod.POST)
    public Object getMohurdProjectGraph(@RequestBody GetWinBidGraphRequestDto dto) {
        return developerGraphService.getMohurdProjectGraph(dto.getId());
    }
}
